package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ProductionEvents generated by hbm2java
 */
@Entity
@Table(name="production_events")
public class ProductionEvents  implements java.io.Serializable {


     private Integer idProEve;
     private CropMainProblem cropMainProblem;
     private Fields fields;
     private Diseases diseases;
     private CropsTypes cropsTypes;
     private Pests pests;
     private ReasonsSoilAnalysis reasonsSoilAnalysis;
     private Weeds weeds;
     private String commentProEve;
     private Integer idProjectProEve;
     private boolean status;
     private Double expectedProductionProEve;
     private Integer formerCropProEve;
     private Boolean drainingProEve;
     private Date dataCaptureDateProEve;
     private Boolean didSoilAnalysisProEve;
     private Boolean irrigateProEve;
     private String otherFormerCropProEve;
     private String otherMainPestProEve;
     private String otherMainDiseaseProEve;
     private String otherMainWeedProEve;
     private Integer numCyclesBeforeProEve;
     private Integer createdBy;

    public ProductionEvents() {
    }
    
    public ProductionEvents(Integer idProEve) {
        this.idProEve=idProEve;
    }

	
    public ProductionEvents(Fields fields, CropsTypes cropsTypes, Integer idProjectProEve, boolean status, Double expectedProductionProEve) {
        this.fields = fields;
        this.cropsTypes = cropsTypes;
        this.idProjectProEve = idProjectProEve;
        this.status = status;
        this.expectedProductionProEve = expectedProductionProEve;
    }
    public ProductionEvents(CropMainProblem cropMainProblem, Fields fields, Diseases diseases, CropsTypes cropsTypes, Pests pests, ReasonsSoilAnalysis reasonsSoilAnalysis, Weeds weeds, String commentProEve, Integer idProjectProEve, boolean status, Double expectedProductionProEve, Integer formerCropProEve, Boolean drainingProEve, Date dataCaptureDateProEve, Boolean didSoilAnalysisProEve, Boolean irrigateProEve, String otherFormerCropProEve, String otherMainPestProEve, String otherMainDiseaseProEve, String otherMainWeedProEve, Integer numCyclesBeforeProEve, Integer createdBy) {
       this.cropMainProblem = cropMainProblem;
       this.fields = fields;
       this.diseases = diseases;
       this.cropsTypes = cropsTypes;
       this.pests = pests;
       this.reasonsSoilAnalysis = reasonsSoilAnalysis;
       this.weeds = weeds;
       this.commentProEve = commentProEve;
       this.idProjectProEve = idProjectProEve;
       this.status = status;
       this.expectedProductionProEve = expectedProductionProEve;
       this.formerCropProEve = formerCropProEve;
       this.drainingProEve = drainingProEve;
       this.dataCaptureDateProEve = dataCaptureDateProEve;
       this.didSoilAnalysisProEve = didSoilAnalysisProEve;
       this.irrigateProEve = irrigateProEve;
       this.otherFormerCropProEve = otherFormerCropProEve;
       this.otherMainPestProEve = otherMainPestProEve;
       this.otherMainDiseaseProEve = otherMainDiseaseProEve;
       this.otherMainWeedProEve = otherMainWeedProEve;
       this.numCyclesBeforeProEve = numCyclesBeforeProEve;
       this.createdBy = createdBy;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_pro_eve", unique=true, nullable=false)
    public Integer getIdProEve() {
        return this.idProEve;
    }
    
    public void setIdProEve(Integer idProEve) {
        this.idProEve = idProEve;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="main_crop_problem_pro_eve")
    public CropMainProblem getCropMainProblem() {
        return this.cropMainProblem;
    }
    
    public void setCropMainProblem(CropMainProblem cropMainProblem) {
        this.cropMainProblem = cropMainProblem;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_field_pro_eve", nullable=false)
    public Fields getFields() {
        return this.fields;
    }
    
    public void setFields(Fields fields) {
        this.fields = fields;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="main_disease_pro_eve")
    public Diseases getDiseases() {
        return this.diseases;
    }
    
    public void setDiseases(Diseases diseases) {
        this.diseases = diseases;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_crop_type_pro_eve", nullable=false)
    public CropsTypes getCropsTypes() {
        return this.cropsTypes;
    }
    
    public void setCropsTypes(CropsTypes cropsTypes) {
        this.cropsTypes = cropsTypes;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="main_pest_pro_eve")
    public Pests getPests() {
        return this.pests;
    }
    
    public void setPests(Pests pests) {
        this.pests = pests;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="reason_soil_analysis_pro_eve")
    public ReasonsSoilAnalysis getReasonsSoilAnalysis() {
        return this.reasonsSoilAnalysis;
    }
    
    public void setReasonsSoilAnalysis(ReasonsSoilAnalysis reasonsSoilAnalysis) {
        this.reasonsSoilAnalysis = reasonsSoilAnalysis;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="main_weed_pro_eve")
    public Weeds getWeeds() {
        return this.weeds;
    }
    
    public void setWeeds(Weeds weeds) {
        this.weeds = weeds;
    }
    
    @Column(name="comment_pro_eve", length=45)
    public String getCommentProEve() {
        return this.commentProEve;
    }
    
    public void setCommentProEve(String commentProEve) {
        this.commentProEve = commentProEve;
    }
    
    @Column(name="id_project_pro_eve")
    public Integer getIdProjectProEve() {
        return this.idProjectProEve;
    }
    
    public void setIdProjectProEve(Integer idProjectProEve) {
        this.idProjectProEve = idProjectProEve;
    }
    
    @Column(name="status", nullable=false)
    public boolean isStatus() {
        return this.status;
    }
    
    public void setStatus(boolean status) {
        this.status = status;
    }
    
    @Column(name="expected_production_pro_eve", precision=22, scale=0)
    public Double getExpectedProductionProEve() {
        return this.expectedProductionProEve;
    }
    
    public void setExpectedProductionProEve(Double expectedProductionProEve) {
        this.expectedProductionProEve = expectedProductionProEve;
    }
    
    @Column(name="former_crop_pro_eve")
    public Integer getFormerCropProEve() {
        return this.formerCropProEve;
    }
    
    public void setFormerCropProEve(Integer formerCropProEve) {
        this.formerCropProEve = formerCropProEve;
    }
    
    @Column(name="draining_pro_eve")
    public Boolean getDrainingProEve() {
        return this.drainingProEve;
    }
    
    public void setDrainingProEve(Boolean drainingProEve) {
        this.drainingProEve = drainingProEve;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="data_capture_date_pro_eve", length=19)
    public Date getDataCaptureDateProEve() {
        return this.dataCaptureDateProEve;
    }
    
    public void setDataCaptureDateProEve(Date dataCaptureDateProEve) {
        this.dataCaptureDateProEve = dataCaptureDateProEve;
    }
    
    @Column(name="did_soil_analysis_pro_eve")
    public Boolean getDidSoilAnalysisProEve() {
        return this.didSoilAnalysisProEve;
    }
    
    public void setDidSoilAnalysisProEve(Boolean didSoilAnalysisProEve) {
        this.didSoilAnalysisProEve = didSoilAnalysisProEve;
    }
    
    @Column(name="irrigate_pro_eve")
    public Boolean getIrrigateProEve() {
        return this.irrigateProEve;
    }
    
    public void setIrrigateProEve(Boolean irrigateProEve) {
        this.irrigateProEve = irrigateProEve;
    }
    
    @Column(name="other_former_crop_pro_eve", length=65535)
    public String getOtherFormerCropProEve() {
        return this.otherFormerCropProEve;
    }
    
    public void setOtherFormerCropProEve(String otherFormerCropProEve) {
        this.otherFormerCropProEve = otherFormerCropProEve;
    }
    
    @Column(name="other_main_pest_pro_eve", length=65535)
    public String getOtherMainPestProEve() {
        return this.otherMainPestProEve;
    }
    
    public void setOtherMainPestProEve(String otherMainPestProEve) {
        this.otherMainPestProEve = otherMainPestProEve;
    }
    
    @Column(name="other_main_disease_pro_eve", length=65535)
    public String getOtherMainDiseaseProEve() {
        return this.otherMainDiseaseProEve;
    }
    
    public void setOtherMainDiseaseProEve(String otherMainDiseaseProEve) {
        this.otherMainDiseaseProEve = otherMainDiseaseProEve;
    }
    
    @Column(name="other_main_weed_pro_eve", length=65535)
    public String getOtherMainWeedProEve() {
        return this.otherMainWeedProEve;
    }
    
    public void setOtherMainWeedProEve(String otherMainWeedProEve) {
        this.otherMainWeedProEve = otherMainWeedProEve;
    }
    
    @Column(name="num_cycles_before_pro_eve")
    public Integer getNumCyclesBeforeProEve() {
        return this.numCyclesBeforeProEve;
    }
    
    public void setNumCyclesBeforeProEve(Integer numCyclesBeforeProEve) {
        this.numCyclesBeforeProEve = numCyclesBeforeProEve;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }

}


